1. Field of the Invention
The disclosure relates generally to data processing, and, more particularly to methods for processing multi-source data.
2. Description of the Related Art
Employment of disk arrays can improve access speed to disks and prevent data lost due to disk failure. Disk arrays integrate several disks into an array, used as a single disk. Data in a disk array is stripped and stored in different disks. A RAID (Redundant Arrays of Independent Disks) controller can access data from physical memory devices (disks) in the disk array, and perform operations thereto. In the disk array, the physical address where each data strip to be stored is allocated according to the space of respective physical memory devices. During data access, related disks in the disk array can work simultaneously, reducing the data access time.
The technique for disk array is referred to as RAID, and configured in levels RAID 0 to RAID 5. In some RAID levels, in addition to data strips stored in different disks, parity information corresponding to data can be further calculated and stored in a specific disk of the disk array. If a disk storing one of the data strips fails, the data strip in the failed disk can be recovered according to the other data strips and the parity information.
FIG. 7 is a schematic diagram illustrating a conventional RAID 5 architecture. As shown in FIG. 7, disks D1˜D4 are selected as a group to create a RAID 5 architecture, in which data strips A1, A2 and A3 of a specific column A are stored in disks D1, D2 and D3, respectively. Additionally, parity information AP corresponding to data is stored in column A of disk D4. The parity information AP is the algorithmic result of the data strips A1, A2 and A3. Similarly, two data strips and the parity information AP can be used to calculate the other data strip. For example, data strip A3 can be calculated according to the parity information AP and data strips A1 and A2. Since a large amount of data calculations is in RAID applications, more efficient data processing methods are required.
In order to make CPU (Central Processing Unit) or memory controller more efficient, data will be requested from one address boundary to another. If the starting address or ending address of the required data is not at the address boundary, more data than required is requested.
Conventional data processing systems and methods will discard the unnecessary data. FIG. 1 shows an example of a data request, where the address boundary is 16 DWs (Double Words), and a data block of 16 DWs can be retrieved by a system at a time. As shown in FIG. 1, the starting address of a data source (SRC) is at 0x20, which is not at the address boundary. Conventionally, the first data request is from 0x00 to 0x80. As described, a data block of 16 DWs is retrieved at a time. Actually, the required 16 DWs data is from 0x20 to 0x60. The data from 0x00 to 0x20 and from 0x60 to 0x80 is not required and discarded. Similarly, the second data request is from 0x40 to 0xc0. Actually, the required 16 DWs data is from 0x60 to 0xa0, and other data is discarded. Other data requests are similar thereto. The system will retrieve and discard unnecessary data for each data request if the starting address is not at the address boundary. In subsequent data requests, some data may be repeatedly retrieved and discarded. Consequently, conventional data processing mechanisms are inefficient if the starting address or ending address of a data source is not at the address boundary.